(function() {"use strict";var __module = CC_EDITOR ? module : {exports:{}};var __filename = 'preview-scripts/assets/script/Finish.js';var __require = CC_EDITOR ? function (request) {return cc.require(request, require);} : function (request) {return cc.require(request, __filename);};function __define (exports, require, module) {"use strict";
cc._RF.push(module, '8fd4doB4jlNu4QzpWSRKbDV', 'Finish', __filename);
// script/Finish.js

"use strict";

/**
 * 人物到达终点
 */
cc.Class({
    extends: cc.Component,

    properties: {},

    onLoad: function onLoad() {},


    onBeginContact: function onBeginContact(contact, selfCollider, otherCollider) {
        //将人物的线速度改为0，播放自身动画和人物动画
        var velocity = otherCollider.node.getComponent(cc.RigidBody)._b2Body.m_linearVelocity;
        velocity.x = 0;
        velocity.y = 0;
        otherCollider.node.prop = "Finished";
        selfCollider.node.getComponent(cc.Animation).play("finish");
        otherCollider.node.getComponent(cc.Animation).play("takeGuitar");
    },

    start: function start() {}
}

// update (dt) {},
);

cc._RF.pop();
        }
        if (CC_EDITOR) {
            __define(__module.exports, __require, __module);
        }
        else {
            cc.registerModuleFunc(__filename, function () {
                __define(__module.exports, __require, __module);
            });
        }
        })();
        //# sourceMappingURL=Finish.js.map
        